export var matchRoute = function(routes) {
    return function(path) {
        /** TODO 比较简陋的匹配器 */ var pathname = typeof path === "string" ? path : path.path;
        return routes.find(function(route) {
            return route.path === pathname || route.path.substring(1) === pathname;
        });
    };
};
